FROM nginx:1.17-alpine

LABEL maintainer="chenwenlong <chenwenlong@epweike.com>"

# repositorie mirror、timezone
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories ; \
    apk add --no-cache --virtual .timezone-deps tzdata curl; \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ; \
    echo 'Asia/Shanghai' > /etc/timezone; \
    rm -rf /usr/share/nginx/html /var/cache/apk/* /tmp/* /var/tmp/* /var/lib/apt/lists/*

COPY nginx.conf /etc/nginx/nginx.conf
COPY swoft.conf /etc/nginx/conf.d/swoft.conf

WORKDIR /var/www
